-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RSDK-9864] Remove gostream middle-man dependency from webcam #4604
Conversation
…here we convert to go image; Change default mimetypes for classifier
…ng default mimetypes for vision since we are failing unit tests with 'do not know how to encode' errors
…urcewrappers Image func
Co-authored-by: nicksanford <[email protected]>
} | ||
} | ||
|
||
for _, d := range needToClose { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just close the driver after getting Properties in the main loop?
Does not seem like that big of a deal if we need to open everything then close out afterwards as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a reasonable suggestion... but I'm a bit hesitant touching this code since it's stuff copy and pasted from gostream. Feels a bit out of scope and could cause confusion since there's no git history of it being here. WDYT @randhid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Sean Yu, we can address more code refactoring/optimizations for webcam when we have time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good
cam, err := tryWebcamOpen(ctx, conf, path, false, constraints, logger) | ||
if err != nil { | ||
return nil, "", errors.Wrap(err, "cannot open webcam") | ||
if conf.Width != 0 && conf.Height != 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be checking conf width and height here? Could the conf specify 0s but the driver that is matched has a valid size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're so right let me fix it to pull a frame regardless of config
Note: we should add back the known cameras <> camera intrinsics/distortion map at some point, to make it easy for whoever is using those without configuring instrinsics explicitly in their config. |
Co-authored-by: randhid <[email protected]>
did we have this at some point? |
Co-authored-by: randhid <[email protected]>
Yes, and in your pr we still have the embedded data.json and the intirnsics logger, but I wonder if we've lost the glue that initialize a camera without explicit intrinsics and extrinsics in the config even if a user doesn't include them. Anyway something for another day. |
as in: try to use these jsons in the case no intrinsics are specified |
Yep |
You can merge this in with my webcam removals. I'll close that pr #4720 |
OK so merge this when discovery card is live? |
It is already - I am more interested in the map of intrinsics for known cameras being preserved. Is there a way to do so in this PR, as there is no real rush to merge this yet? |
I forgot I said for another day - let's merge this in and make a follow-up ticket. |
|
…botics#4604) Co-authored-by: nicksanford <[email protected]> Co-authored-by: Dan Gottlieb <[email protected]> Co-authored-by: Ethan Look-Potts <[email protected]> Co-authored-by: abe-winter <[email protected]> Co-authored-by: Eliot Horowitz <[email protected]> Co-authored-by: Naomi Pentrel <[email protected]> Co-authored-by: Maxim Pertsov <[email protected]> Co-authored-by: nicksanford <[email protected]> Co-authored-by: Devin Hilly <[email protected]> Co-authored-by: martha-johnston <[email protected]> Co-authored-by: Kurt S <[email protected]> Co-authored-by: randhid <[email protected]> Co-authored-by: randhid <[email protected]>
RSDK-9864
Remove gostream middle-man dependency from webcam
Tested webcam on Mac and RPI4. Live and GetImage views on app. Unplug + replug on RPI4 (Logitech C90 Pro). Driver selection on app doesn't work anymore (as expected)